// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity.p_a;

import android.content.Context;
import android.view.*;
import android.widget.*;
import com.nnee.p_fk.cls_k;
import com.nnee.p_img.cls_d;
import com.nnee.p_pr.p_atom.cls_g;
import com.nnee.p_pr.p_atom.cls_u;
import java.util.LinkedList;
import java.util.List;

// Referenced classes of package com.nnee.p_pr.p_activity.a:
//            f, h

public class cls_ak extends BaseAdapter
{

    public cls_ak(Context context)
    {
        c = context;
        d = (LayoutInflater)context.getSystemService("layout_inflater");
    }

    private void a(cls_f f1, View view)
    {
        f1.a = (ImageView)view.findViewById(0x7f0d00eb);
        f1.b = (TextView)view.findViewById(0x7f0d00ed);
        f1.c = (TextView)view.findViewById(0x7f0d00f0);
        f1.d = (TextView)view.findViewById(0x7f0d00f1);
        f1.e = (RatingBar)view.findViewById(0x7f0d00ee);
_L1:
        return;
        NullPointerException nullpointerexception;
        nullpointerexception;
        nullpointerexception.printStackTrace();
          goto _L1
        Exception exception;
        exception;
        throw exception;
    }

    private void a(cls_f f1, cls_u u1, int i)
    {
        int j;
        String s = u1.b(g.g);
        if(s == null)
            s = u1.b(g.f);
        f1.a.setImageDrawable(k.a(c).b(0x7f02012c));
        if(s != null)
        {
            StringBuilder stringbuilder = new StringBuilder();
            f1.a.setTag(stringbuilder);
            com.nnee.p_img.cls_d.a().a(stringbuilder, 1, s, new cls_h(this, f1), -1, -1, 2, a);
        }
        String s1 = u1.U();
        if(s1 != null && f1.b != null)
            f1.b.setText(s1);
        if(f1.e != null)
        {
            f1.e.setNumStars(u1.ae());
            f1.e.setRating((float)u1.ah());
        }
        if(f1.c == null)
            break MISSING_BLOCK_LABEL_210;
        j = u1.am();
        TextView textview;
        Context context;
        Object aobj[];
        if(j <= 0)
            j = 0;
        textview = f1.c;
        context = c;
        aobj = new Object[1];
        aobj[0] = Integer.valueOf(j);
        textview.setText(context.getString(0x7f0a00ae, aobj));
        if(f1.d != null)
            f1.d.setText(u1.ai());
_L1:
        return;
        NullPointerException nullpointerexception;
        nullpointerexception;
        nullpointerexception.printStackTrace();
          goto _L1
        Exception exception;
        exception;
        throw exception;
    }

    public void a()
    {
        LinkedList linkedlist = b;
        linkedlist;
        JVM INSTR monitorenter ;
        b.clear();
        notifyDataSetChanged();
        return;
    }

    public void a(int i)
    {
        a = i;
    }

    public void a(LinkedList linkedlist)
    {
        b = linkedlist;
    }

    public void a(List list)
    {
        if(list != null && list.size() != 0) goto _L2; else goto _L1
_L1:
        return;
_L2:
        LinkedList linkedlist = b;
        linkedlist;
        JVM INSTR monitorenter ;
        for(int i = -1 + list.size(); i >= 0; i--)
            b.addFirst(list.get(i));

        notifyDataSetChanged();
        if(true) goto _L1; else goto _L3
_L3:
    }

    public cls_u b(int i)
    {
        cls_u u1;
        if(b != null)
        {
            if(i >= b.size())
                i = -1 + b.size();
            u1 = (u)b.get(i);
        } else
        {
            u1 = null;
        }
        return u1;
    }

    public void b(List list)
    {
        if(list != null && list.size() != 0) goto _L2; else goto _L1
_L1:
        return;
_L2:
        LinkedList linkedlist = b;
        linkedlist;
        JVM INSTR monitorenter ;
        b.addAll(list);
        notifyDataSetChanged();
        if(true) goto _L1; else goto _L3
_L3:
    }

    public int getCount()
    {
        int i = 0;
        if(b != null)
            i = b.size();
        return i;
    }

    public Object getItem(int i)
    {
        return b(i);
    }

    public long getItemId(int i)
    {
        return (long)i;
    }

    public View getView(int i, View view, ViewGroup viewgroup)
    {
        cls_f f1;
        cls_u u1;
        if(view != null && (view.getTag() instanceof cls_f))
        {
            f1 = (f)view.getTag();
        } else
        {
            view = d.inflate(0x7f030040, null);
            f1 = new cls_f(this);
            a(f1, view);
            view.setTag(f1);
        }
        u1 = b(i);
        if(u1 != null)
            a(f1, u1, i);
        return view;
    }

    private int a;
    private LinkedList b;
    private Context c;
    private LayoutInflater d;
}
